from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    HostViewSet, HostGroupViewSet, ProjectViewSet,
    EnvironmentViewSet, UserViewSet, UserGroupViewSet,
    SystemInspectionView, RecipientViewSet
)

router = DefaultRouter()
router.register(r'hosts', HostViewSet, basename='host')
router.register(r'host-groups', HostGroupViewSet, basename='hostgroup')
router.register(r'projects', ProjectViewSet, basename='project')
router.register(r'environments', EnvironmentViewSet, basename='environment')
router.register(r'users', UserViewSet, basename='user')
router.register(r'user-groups', UserGroupViewSet, basename='usergroup')
router.register(r'recipients', RecipientViewSet, basename='recipient')

urlpatterns = [
    path('', include(router.urls)),
    path('inspection/', SystemInspectionView.as_view(), name='inspection'),
]
